package com.osgi.desktop.services;

import javax.swing.AbstractAction;
import javax.swing.JButton;
import javax.swing.JToolBar;

public class ToolBarServiceImpl implements ToolBarService {
    private JToolBar toolBar;
    public ToolBarServiceImpl(JToolBar toolBar){
        this.toolBar = toolBar;
    }
    @Override
    public JButton addActionInToolBar(AbstractAction abstractAction) {
        return toolBar.add(abstractAction);
    }
    
    @Override
    public void removeActionFromToolBar(JButton button) {
        toolBar.remove(button);
    }
}
